package cn.gzlsdl.glassesmanage.modules.controller;

import cn.gzlsdl.glassesmanage.common.result.R;
import cn.gzlsdl.glassesmanage.common.util.BaseController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping
public class LoginController extends BaseController {

    @RequestMapping("/register")
    public R register(@RequestParam Map<String,Object> params){
        String phone= (String) params.get("phone");
        String code= (String) params.get("code");

        if ("gzlsdl".equals(code)){
            log.info("注册成功");
            return R.ok("注册成功");
        }else {
            return R.error(2,"验证码不正确");
        }
    }

}
